package com.tping.sp.controller;

import com.tping.sp.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.Map;

@Controller
public class UserController {

    @Autowired
    private UserService userService;

    @ResponseBody
    @RequestMapping("/userInfo")
    public Map<String, Object> userInfo(){

        System.out.println("==============>>>>>UserController");

        return userService.findUserInfo();
    }

    @ResponseBody
    @RequestMapping("/userName")
    public String userName(){
        return "xiaoli";
    }

}
